package stdio.costa.imoca.converter;

import stdio.costa.imoca.dto.ActivityWithPostcardbackDTO;
import stdio.costa.imoca.model.Activity;

public class Activity2DTO {

	public static ActivityWithPostcardbackDTO convert(Activity activity) {
		if (activity == null) {
			return null;
		}
		
		ActivityWithPostcardbackDTO dto = new ActivityWithPostcardbackDTO();
		
		dto.setName(activity.getName());
		dto.setDescription(activity.getDescription());
		dto.setStart_time(activity.getStartTime());
		dto.setEnd_time(activity.getEndTime());
		dto.setPostcardbacks(activity.getPostcardBacks());
		
		return dto;
	}
}
